<?php
require_once 'lib/controllerWithoutGetOrPost.php';
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past

/**
 * Get the blurb for the featured person
 * @return string
 * @param int $personId
 */
 function getFeaturingPersonBlurb($personId) {
    global $db;
    $blurb = '';
	$queryfeaturingperson = "Select `Blurb` from FeaturingPerson where PersonID = ".$personId;
	$resultfeaturingperson = $db->query($queryfeaturingperson);	
	
	if(!empty($resultfeaturingperson)) {
		$row = $db->fetch($resultfeaturingperson);
        $blurb = $db->unescape($row['Blurb']);
	} 
	return $blurb;
}
$username = $db->escape($_POST['username']);
$password = $_POST['password'];
if($username === "amemorytree" && $password === "pass153word") {
	$personId = intval($_POST['personid']);
    echo getFeaturingPersonBlurb($personId);	
} 


?>
